* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #0a0a1a;
    color: #e0e0ff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ¼ҳʽ */
#login-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background: radial-gradient(circle at center, #1a1a3a 0%, #0a0a1a 100%);
    position: relative;
    z-index: 100;
}

.login-container {
    background-color: rgba(20, 20, 40, 0.8);
    border: 2px solid #4a2c8d;
    border-radius: 10px;
    padding: 30px;
    width: 400px;
    box-shadow: 0 0 20px rgba(106, 13, 173, 0.5);
    position: relative;
}

    .login-container::before {
        content: '';
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        background: linear-gradient(45deg, #6a0dad, #ff0055, #00ccff);
        border-radius: 12px;
        z-index: -1;
        filter: blur(10px);
        opacity: 0.5;
    }

.login-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #b19cd9;
    text-shadow: 0 0 10px rgba(177, 156, 217, 0.7);
    font-family: 'Georgia', serif;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #a0a0e0;
}

.form-input {
    width: 100%;
    padding: 12px;
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 5px;
    color: #e0e0ff;
    font-size: 1rem;
}

    .form-input:focus {
        outline: none;
        border-color: #6a0dad;
        box-shadow: 0 0 10px rgba(106, 13, 173, 0.5);
    }

.btn {
    padding: 12px 20px;
    background: linear-gradient(to right, #4a2c8d, #6a0dad);
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn:hover {
        background: linear-gradient(to right, #5a3c9d, #7a1ddd);
        box-shadow: 0 0 15px rgba(106, 13, 173, 0.7);
    }

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.toggle-form {
    text-align: center;
    margin-top: 20px;
    color: #a0a0e0;
}

    .toggle-form a {
        color: #b19cd9;
        text-decoration: none;
        cursor: pointer;
    }

#world-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: radial-gradient(circle at 20% 30%, #1a1a3a 0%, #0a0a1a 100%);
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.world-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(20, 20, 40, 0.8);
    border-bottom: 2px solid #4a2c8d;
    height: 70px;
}

.world-title {
    font-size: 1.8rem;
    color: #b19cd9;
    text-shadow: 0 0 10px rgba(177, 156, 217, 0.7);
    font-family: 'Georgia', serif;
}

.character-list {
    display: flex;
    gap: 15px;
    align-items: center;
}

.character-card {
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

    .character-card:hover {
        background-color: rgba(40, 40, 80, 0.9);
        border-color: #6a0dad;
        box-shadow: 0 0 10px rgba(106, 13, 173, 0.5);
    }

    .character-card.active {
        background-color: rgba(60, 30, 100, 0.9);
        border-color: #b19cd9;
        box-shadow: 0 0 15px rgba(177, 156, 217, 0.7);
    }

.create-character-btn {
    background: linear-gradient(to right, #4a2c8d, #6a0dad);
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .create-character-btn:hover {
        background: linear-gradient(to right, #5a3c9d, #7a1ddd);
        box-shadow: 0 0 15px rgba(106, 13, 173, 0.7);
    }

/* С */
.world-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* С๦ */
.world-sidebar {
    width: 200px;
    background-color: rgba(20, 20, 40, 0.8);
    border-right: 2px solid #4a2c8d;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-btn {
    background-color: rgba(30, 30, 60, 0.8);
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 15px 20px;
    color: #e0e0ff;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

    .sidebar-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 5px;
        height: 100%;
        background: linear-gradient(to bottom, #6a0dad, #b19cd9);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .sidebar-btn:hover {
        background-color: rgba(40, 40, 80, 0.9);
        padding-left: 25px;
    }

        .sidebar-btn:hover::before {
            transform: scaleY(1);
        }

    .sidebar-btn.active {
        background-color: rgba(60, 30, 100, 0.9);
        padding-left: 25px;
    }

        .sidebar-btn.active::before {
            transform: scaleY(1);
        }

/* СҲ */
.world-main {
    flex: 1;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.content-panel {
    display: none;
    height: 100%;
    overflow: auto;
    padding: 15px;
    background-color: rgba(20, 20, 40, 0.5);
    border-radius: 8px;
    border: 1px solid #4a2c8d;
}

    .content-panel.active {
        display: block;
    }

.panel-title {
    font-size: 1.5rem;
    color: #b19cd9;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a2c8d;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 8px;
    padding: 15px;
}

.stat-name {
    color: #a0a0e0;
    font-size: 0.9rem;
}

.stat-value {
    color: #e0e0ff;
    font-size: 1.2rem;
    margin-top: 5px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.item-card {
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .item-card:hover {
        background-color: rgba(40, 40, 80, 0.9);
        border-color: #6a0dad;
        transform: translateY(-3px);
    }

.item-name {
    color: #e0e0ff;
    font-size: 1rem;
    margin-bottom: 5px;
}

.item-desc {
    color: #a0a0e0;
    font-size: 0.8rem;
}

/* ͼʽ */
.dungeon-list, .region-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.dungeon-card, .region-card {
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .dungeon-card:hover, .region-card:hover {
        background-color: rgba(40, 40, 80, 0.9);
        border-color: #6a0dad;
        transform: translateY(-5px);
    }

.dungeon-level {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(to right, #4a2c8d, #6a0dad);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.dungeon-name, .region-name {
    font-size: 1.2rem;
    color: #b19cd9;
    margin-bottom: 10px;
}

.dungeon-desc, .region-desc {
    color: #a0a0e0;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.dungeon-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-top: 10px;
}

.status-available {
    background-color: rgba(0, 200, 0, 0.3);
    color: #a0ffa0;
}

.status-locked {
    background-color: rgba(200, 0, 0, 0.3);
    color: #ffa0a0;
}

/* ̽/սҳʽ */
#adventure-page {
    display: none;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: radial-gradient(circle at 20% 30%, #1a1a3a 0%, #0a0a1a 100%);
    position: relative;
    overflow: hidden;
}

.adventure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(20, 20, 40, 0.8);
    border-bottom: 2px solid #4a2c8d;
    height: 70px;
}

.adventure-title {
    font-size: 1.8rem;
    color: #b19cd9;
    text-shadow: 0 0 10px rgba(177, 156, 217, 0.7);
    font-family: 'Georgia', serif;
}

/* սʽ */
.battle-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
}

.battle-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.battle-log {
    flex: 1;
    background-color: rgba(10, 10, 20, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-family: monospace;
}

.battle-log-entry {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(74, 44, 141, 0.3);
}

    .battle-log-entry:last-child {
        border-bottom: none;
    }

.battle-actions {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 10px;
}

.battle-action-btn {
    padding: 12px;
    background: linear-gradient(to right, #4a2c8d, #6a0dad);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .battle-action-btn:hover {
        background: linear-gradient(to right, #5a3c9d, #7a1ddd);
        box-shadow: 0 0 10px rgba(106, 13, 173, 0.7);
    }

    .battle-action-btn:disabled {
        background: rgba(60, 60, 80, 0.8);
        color: #8080a0;
        cursor: not-allowed;
        box-shadow: none;
    }

/* ս͵ʽ */
.battle-participants {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    height: 250px;
}

.party-members, .enemies {
    display: flex;
    gap: 30px;
}

.combatant {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 140px;
    text-align: center;
}

    .combatant.enemy {
        cursor: pointer;
    }

        .combatant.enemy.selected .combatant-avatar {
            box-shadow: 0 0 20px #ff0055;
            border: 3px solid #ff0055;
        }

        .combatant.enemy .combatant-avatar {
            transition: all 0.3s ease;
            box-shadow: 0 0 10px #ff0055;
        }

        .combatant.enemy .combatant-name {
            color: #ff80aa;
        }

.combatant-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
    background: linear-gradient(to bottom, #6a0dad, #4a2c8d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden;
}

.combatant.enemy .combatant-avatar {
    background: linear-gradient(to bottom, #ff0055, #cc0044);
}

.combatant-name {
    font-size: 1rem;
    color: #b19cd9;
    margin-bottom: 10px;
}

.health-bar, .mana-bar {
    height: 8px;
    width: 100%;
    background-color: rgba(60, 60, 80, 0.8);
    border-radius: 4px;
    margin-bottom: 5px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(to right, #ff0055, #ff5500);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.mana-fill {
    height: 100%;
    background: linear-gradient(to right, #0066ff, #00aaff);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.combatant-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #a0a0e0;
    width: 100%;
}

/* ʽ */
.backpack-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.backpack-content {
    background-color: rgba(20, 20, 40, 0.95);
    border: 2px solid #4a2c8d;
    border-radius: 10px;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(106, 13, 173, 0.8);
}

.backpack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a2c8d;
}

.backpack-title {
    font-size: 1.5rem;
    color: #b19cd9;
}

.close-backpack {
    background: none;
    border: none;
    color: #b19cd9;
    font-size: 1.5rem;
    cursor: pointer;
}

.backpack-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.backpack-item {
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .backpack-item:hover {
        background-color: rgba(40, 40, 80, 0.9);
        border-color: #6a0dad;
        transform: translateY(-3px);
    }

/* ʽ - ϶͵С */
.game-chat {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 400px;
    height: 350px;
    background-color: rgba(20, 20, 40, 0.9);
    border: 2px solid #4a2c8d;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(106, 13, 173, 0.5);
    z-index: 100;
    resize: both;
    overflow: hidden;
    min-width: 300px;
    min-height: 200px;
    max-width: 600px;
    max-height: 500px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: rgba(30, 30, 60, 0.9);
    border-bottom: 1px solid #4a2c8d;
    border-radius: 10px 10px 0 0;
    cursor: move;
    user-select: none;
}

.chat-title {
    font-size: 1.1rem;
    color: #b19cd9;
}

.chat-controls {
    display: flex;
    gap: 5px;
}

.chat-control-btn {
    background: none;
    border: none;
    color: #a0a0e0;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

    .chat-control-btn:hover {
        color: #b19cd9;
        background-color: rgba(106, 13, 173, 0.3);
    }

.chat-tabs {
    display: flex;
    background-color: rgba(20, 20, 40, 0.9);
    border-bottom: 1px solid #4a2c8d;
}

.chat-tab {
    flex: 1;
    padding: 8px 10px;
    text-align: center;
    background-color: rgba(30, 30, 60, 0.8);
    border: none;
    color: #a0a0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

    .chat-tab:first-child {
        border-radius: 0;
    }

    .chat-tab:last-child {
        border-radius: 0;
    }

    .chat-tab.active {
        background-color: rgba(60, 30, 100, 0.9);
        color: #b19cd9;
    }

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 0.9rem;
    background-color: rgba(10, 10, 20, 0.8);
}

.chat-message {
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 5px;
    background-color: rgba(30, 30, 60, 0.5);
    line-height: 1.4;
}

    .chat-message.world {
        border-left: 3px solid #6a0dad;
    }

    .chat-message.party {
        border-left: 3px solid #0abda7;
    }

    .chat-message.private {
        border-left: 3px solid #ff0055;
    }

.chat-input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #4a2c8d;
    background-color: rgba(20, 20, 40, 0.9);
    border-radius: 0 0 10px 10px;
}

.chat-input {
    flex: 1;
    padding: 8px 12px;
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 5px;
    color: #e0e0ff;
    font-size: 0.9rem;
}

.chat-send-btn {
    margin-left: 10px;
    background: linear-gradient(to right, #4a2c8d, #6a0dad);
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
}

.chat-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, #4a2c8d 50%);
}

/* Ч */
.floating-crystal {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, rgba(106, 13, 173, 0.7), transparent 70%);
    border-radius: 50%;
    filter: blur(5px);
    z-index: 0;
}

.crystal-1 {
    top: 10%;
    left: 10%;
    animation: float 15s infinite ease-in-out;
}

.crystal-2 {
    bottom: 20%;
    right: 15%;
    animation: float 18s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* ɫ岼 */
.character-panel {
    padding: 0;
}

.character-content {
    display: flex;
    height: 100%;
}

.character-avatar-section {
    width: 33.33%;
    padding: 20px;
    border-right: 1px solid #4a2c8d;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.character-stats-section {
    width: 66.67%;
    padding: 20px;
    overflow-y: auto;
}

/* ͷ */
.avatar-container {
    text-align: center;
}

.character-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid #6a0dad;
    object-fit: cover;
    margin-bottom: 15px;
}

.avatar-upload {
    margin-top: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ɫ */
.character-portrait {
    margin-top: 20px;
}

.portrait-textarea {
    width: 100%;
    height: 200px;
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 5px;
    color: #e0e0ff;
    padding: 10px;
    resize: vertical;
    font-family: inherit;
}

    .portrait-textarea:focus {
        outline: none;
        border-color: #6a0dad;
        box-shadow: 0 0 10px rgba(106, 13, 173, 0.5);
    }

/* װ */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.equipment-slot {
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

    .equipment-slot:hover {
        background-color: rgba(40, 40, 80, 0.9);
        border-color: #6a0dad;
    }

.slot-label {
    font-size: 0.8rem;
    color: #a0a0e0;
    margin-bottom: 5px;
}

.slot-item {
    font-size: 0.9rem;
    color: #e0e0ff;
}

/* ܲ */
.skill-slots-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.skill-slot {
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

    .skill-slot:hover {
        background-color: rgba(40, 40, 80, 0.9);
        border-color: #6a0dad;
    }

/* ѡ񵯴 */
.selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.selection-content {
    background-color: rgba(20, 20, 40, 0.95);
    border: 2px solid #4a2c8d;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #4a2c8d;
}

.selection-title {
    font-size: 1.3rem;
    color: #b19cd9;
}

.close-selection {
    background: none;
    border: none;
    color: #b19cd9;
    font-size: 1.5rem;
    cursor: pointer;
}

.selection-items {
    padding: 20px;
    display: grid;
    gap: 10px;
}

.selection-item {
    background-color: rgba(30, 30, 60, 0.8);
    border: 1px solid #4a2c8d;
    border-radius: 5px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .selection-item:hover {
        background-color: rgba(40, 40, 80, 0.9);
        border-color: #6a0dad;
    }

.item-stats {
    margin-top: 5px;
    font-size: 0.8rem;
    color: #a0a0e0;
}

    .item-stats span {
        margin-right: 10px;
    }

.no-items {
    text-align: center;
    color: #a0a0e0;
    padding: 20px;
}